<title>消息管理</title>
<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>消息管理</cite></a>
    </div>
</div>
<div class="layui-col-xs12 layui-col-sm10 layui-col-md8 layui-col-md-offset2 layui-col-sm-offset1"
    style="margin-top: 20px;">
    <div class="layui-card">
        <div class="layui-card-header" id="title">新增消息</div>
        <div class="layui-card-body">
            <form class="layui-form layui-form-pane" action="" lay-filter="notice">
                <input name="id" value="" autocomplete="off" class="layui-input layui-hide">
                <div class="layui-form-item layui-form-text"><label class="layui-form-label">消息标题</label>
                    <div class="layui-input-block"><input type="text" name="title" autocomplete="off"
                            lay-verify="required" lay-reqText="标题不能为空！" lay-verType="tips" class="layui-input"></div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">邮件推送(本条消息将会推送给绑定邮箱的用户)</label>
                    <div class="layui-input-block">
                        <select name="mail">
                            <option value="off" selected="">关闭</option>
                            <option value="on">开启</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">内容</label>
                    <div class="layui-input-block">
                        <textarea placeholder="支持HTML代码" rows="5" class="layui-textarea" name="content"
                            id="content"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <div class="layui-col-xs8 layui-col-md6 layui-col-md-offset2"><button type="submit"
                                class="layui-btn layui-btn-default layui-btn-fluid" lay-submit=""
                                lay-filter="send_notice">发送</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="layui-col-xs12 layui-col-sm10 layui-col-md8 layui-col-md-offset2 layui-col-sm-offset1"
    style="padding-top: 10px;">
    <div class="layui-card">
        <div class="layui-card-body">
            <table class="layui-hide" id="notice_table" lay-filter="notice_table">
            </table>
        </div>
    </div>
</div>

<div class="layui-col-xs12 layui-col-sm10 layui-col-md8 layui-col-md-offset2 layui-col-sm-offset1"
    style="padding-top: 10px;">
    <div class="layui-card">
        <div class="layui-card-body">
            <span id="tips">发送邮件队列：</span>
            <div class="layui-progress layui-progress-big" lay-showpercent="true">
                <div class="layui-progress-bar" lay-percent="0/0" id="progress"></div>
            </div>
            <div class="site-demo-button" style="margin-top: 20px; margin-bottom: 0;">
                <button type="button" class="layui-btn layui-btn-default site-demo-active"
                    onclick="del_dl()">删除未发送信息</button>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="noticebar">
    <a class="layui-btn layui-btn-default layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script type="text/html" id="switch">
    <input type="checkbox" name="mail" value="{{d.status}}" lay-skin="switch" lay-text="开启|关闭"
        {{d.mail >= 1 ? 'checked': ' '}} disabled>
</script>
<script>
    layui.use('notice', layui.factory('notice'));
</script>